package com.zh.kotlin_mvvm.ui

import android.app.ActivityManager.TaskDescription
import android.os.Build
import android.os.Bundle
import com.zh.common.base.BaseActivity
import com.zh.kotlin_mvvm.R
import com.zh.kotlin_mvvm.databinding.ActivityProcessBinding

class ProcessActivity : BaseActivity<ActivityProcessBinding>() {

    override fun initView(savedInstanceState: Bundle?) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            setTaskDescription(TaskDescription("新窗口", R.mipmap.delete_black))
        } else {
            setTaskDescription(TaskDescription("新窗口"))
        }
    }

    override fun finish() {//将栈移动到后台
        moveTaskToBack(true)
    }
}